package com.java.observer;

import lombok.extern.slf4j.Slf4j;

/**
 * @Author: TongRui乀
 * @Date: 2019/3/6 13:32
 * @description： 观察者实现类
 */
@Slf4j
public class ObserverA extends Observer {

    public ObserverA(Subject subject){
        this.subject = subject;

        this.subject.addObserver(this);
    }

    @Override
    public void update() {
        log.info("观察者A 观察到主题发生变化了！");
    }
}
